package com.heima.article.controller;


import com.heima.article.entity.ApAuthor;
import com.heima.article.service.IApAuthorService;
import com.heima.common.dto.ResponseResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @BelongsProject: heima-leadnews
 * @BelongsPackage: com.heima.article.controller
 * @Author: wangjian
 * @CreateTime: 2022-06-29  00:22
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
@RequestMapping("/api/v1/author")
@Api(tags = "APP文章作者信息表接口")
@CrossOrigin
public class ApAuthorController {
    @Autowired
    private IApAuthorService apAuthorService;
    /**
     * @description: 保存文章作者
     * @author: wangjian
     * @param: entity
     * @return: com.heima.common.dto.ResponseResult<com.heima.article.entity.ApAuthor>
     **/
    @PostMapping
    public ResponseResult<ApAuthor> saveApAuthor(@RequestBody ApAuthor entity) {
        return apAuthorService.saveApAuthor(entity);
    }
}
